#include <stdio.h>
#include <stdlib.h>

int main()
{
    int *a = malloc(3*sizeof(int));
    a[0] = 1;
    a[1] = 2;
    a[2] = 3;
    //扩容
    int *b = realloc(a,sizeof(int)*5);
    b[3] = 4;
    b[4] = 5;

    for(int i = 0; i < 5; i++)
    {
        printf("%d ",a[i]);
    }
    printf("\n");
    printf("a:%x  b:%x\n",a,b);
    return 0;
}